message anatomy
Every message contains 8 values, or arguments:
( window, message, v0, v1, v2, v3, r0, r1 )
... or ...
( grid, message, v0, v1, v2, v3, kid, r1 )
... or ...
( wingrid, message, v0, v1, v2, v3, r0, r1 )
( wingrid, message, v0, v1, v2, v3, kid, r1 )
GraphicsDesigner messages contain only XLONG arguments.
The first 7 arguments of GuiDesigner messages are always XLONG too, but the last may be
XLONG , STRING , or an array of any valid type. The type of the last argument must be the
type appropriate to the message argument.
window, grid, wingrid
window contains the window number the message refers to.
grid contains the grid number the message refers to.
wingrid contains the window or grid the message refers to.
wingrid is the name given to arguments that contain a window number in some contexts and a
grid number in others.
When a message refers to one of the kids of grid , it is identified by grid,kid . When
kid=0 the message refers to grid itself.
message
message contains a message number, a numeric stand-in for an original message name like
"KeyDown" . Most programs communicate with message numbers exclusively because
that's what messages contain. Message numbers are assigned to equivalent XLONG message
variables like #KeyDown in InitGui() during initialization.
v0, v1, v2, v3, r0, r1
v0,v1,v2,v3,r0,r1 are general purpose arguments whose meanings depend on message. In
GraphicsDesigner mouse messages, for example, they contain xWin,yWin,state,time,0,grid.
In some messages, one or more argument contains no defined value. GraphicsDesigner and
GuiDesigner always fill these arguments with zero and expect other programs to do the
same.
kid
r0 aka kid is a general purpose argument that always contains a kid number in grid
messages.